package indi.kane.simpleproject.service.impl;

import indi.kane.simpleproject.dao.AccountMapper;
import indi.kane.simpleproject.entity.Account;
import indi.kane.simpleproject.service.IAccountService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class AccountService implements IAccountService
{
    @Resource
    private AccountMapper accountMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return accountMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Account record) {
        return accountMapper.insert(record);
    }

    @Override
    public int insertSelective(Account record) {
        return accountMapper.insertSelective(record);
    }

    @Override
    public Account login(String name, String password) {
        return accountMapper.login(name, password);
    }

    @Override
    public Account selectByPrimaryKey(Long id) {
        return accountMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Account record) {
        return accountMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Account record) {
        return accountMapper.updateByPrimaryKey(record);
    }
}
